POPUPINAIR = 0;
LASTJSID=-1;
function showPopup(msg,txt,tablename,jsid) {

	if (msg==1)
	{ html = 'Game starting on <a href="#switch" onclick="goToTable('+jsid+')">';
	  html+=tablename;
	  html+=', click to join.</a>';
	  html+='<br><span class="psmall">'+createTableInfo2(txt)+'</span>';
	}
	if (msg==2) {
		html = txt;
	}
	if (POPUPINAIR==1 || LASTJSID==jsid) return;
		POPUPINAIR=1;
		LASTJSID=jsid;
		document.getElementById('popup').innerHTML=html;	
    	$('#popup').fadeIn(600);
		setTimeout("if (POPUPINAIR==1) {   $('#popup').fadeOut(600); POPUPINAIR=0; }",14000);  
    	return;
    }

function goToTable(JSID) {
	$('#popup').BlindUp(600); POPUPINAIR=0;
	switchBoards(JSID);
	Tracker.chairEvent();
	setTimeout("set_play_now(true); Tracker.game_start(1);",2000);
}
